function showMsg(message) {
	jQuery('#errMsg').html('<span style="font-size:0.3rem;color:red;">'+message+'</span>');
}
function showErrMsg(data) {
	showMsg('(code:' + data.code + ')' + data.errorMessage);
}

function showNetworkErrMsg(data, status) {
	showMsg('(status:' + status + ')' + data);
}

function isErr(data) {
	return data.code != 0;
}

function logout($window) {
	jQuery.post("api/logout", function(data) {
		$window.location.href = "login.jsp";
	});
}